# app/hospital_level/serializers.py
from rest_framework import serializers
from .models import McHospitalLevel


class McHospitalLevelSerializer(serializers.ModelSerializer):
    class Meta:
        model = McHospitalLevel
        fields = ["id", "level", "created_time", "updated_time"]


class McForeignHospitalLevelSerializer(serializers.ModelSerializer):
    """用于外键嵌套的轻量版，仅返回必要字段"""
    class Meta:
        model = McHospitalLevel
        fields = ["id", "level"]
